//
//  YMQRCodeManager.h
//  QrCode
//
//  Created by Andrew on 2018/6/22.
//  Copyright © 2018年 Andrew. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YMQRCode.h"

@interface YMQRCodeManager : NSObject

/**
 校验是否有相机权限

 @param permissionGrandted 获取相机权限回调
 */
+ (void)ym_checkCameraAuthorizationStatusWithGrand:(void(^)(BOOL granted))permissionGrandted;


/**
 校验是否相册权限

 @param permissionGrandted 获取相册权限回调
 */
+ (void)ym_checkAlbumAuthorizationStatusWithGrand:(void(^)(BOOL granted))permissionGrandted;


/**
 根据扫描器类型支持编码格式

 @param scannerType 扫描器类型
 @return 编码格式组成的数组
 */
+ (NSArray *)ym_metadataObjectTypesWithType:(YMScannerType)scannerType;


/**
 根据扫描器类型配置导航栏标题
 
 */
+ (NSString *)ym_navigationItemTitleWithType:(YMScannerType)scannerType;


/**
 手电筒开关

 @param on YES:打开 NO:关闭
 */
+ (void)ym_flashlightOn:(BOOL)on;

@end
